package com.ykh.spring;

import com.ykh.spring.impl.CalculateImpl;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2022-08-24
 * Time: 9:16
 */
public class CalculatePraxy implements Calculate{
    CalculateImpl target;

    public CalculatePraxy(CalculateImpl target) {
        this.target = target;
    }

    @Override
    public int add(int a, int b) {
        System.out.println("日志 : add方法开始了 参数是: " + a +"  " + b);
        int result = target.add(a, b);
        System.out.println("日志: add方法结束 结果是  " + result);
        return result;
    }

    @Override
    public int substraction(int a, int b) {
        return 0;
    }

    @Override
    public int multiplication(int a, int b) {
        return 0;
    }

    @Override
    public int division(int a, int b) {
        return 0;
    }
}
